home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / share / automake-1.6 / am / scripts.am < prev    next >
Encoding:
Text File  |  2005-10-16  |  3.5 KB  |  101 lines

  1. ## automake - create Makefile.in from Makefile.am
  2. ## Copyright 1994, 1995, 1996, 1998, 1999, 2001 Free Software Foundation, Inc.
  3.  
  4. ## This program is free software; you can redistribute it and/or modify
  5. ## it under the terms of the GNU General Public License as published by
  6. ## the Free Software Foundation; either version 2, or (at your option)
  7. ## any later version.
  8.  
  9. ## This program is distributed in the hope that it will be useful,
  10. ## but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  12. ## GNU General Public License for more details.
  13.  
  14. ## You should have received a copy of the GNU General Public License
  15. ## along with this program; if not, write to the Free Software
  16. ## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
  17. ## 02111-1307, USA.
  18.  
  19.  
  20. ## ------------ ##
  21. ## Installing.  ##
  22. ## ------------ ##
  23.  
  24. if %?INSTALL%
  25. ## if doesn't work properly for Automake variables yet.
  26. _am_installdirs += $(DESTDIR)$(%NDIR%dir)
  27. ?BASE?%DIR%SCRIPT_INSTALL = $(INSTALL_SCRIPT)
  28. ?!BASE?%DIR%SCRIPT_INSTALL = $(install_sh_SCRIPT)
  29. ?EXEC?.PHONY install-exec-am: install-%DIR%SCRIPTS
  30. ?!EXEC?.PHONY install-data-am: install-%DIR%SCRIPTS
  31. install-%DIR%SCRIPTS: $(%DIR%_SCRIPTS)
  32.     @$(NORMAL_INSTALL)
  33.     $(mkinstalldirs) $(DESTDIR)$(%NDIR%dir)
  34. ## Funny invocation because Makefile variable can be empty, leading to
  35. ## a syntax error in sh.
  36.     @list='$(%DIR%_SCRIPTS)'; for p in $$list; do \
  37. ## A file can be in the source directory or the build directory.
  38.       if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
  39.       if test -f $$d$$p; then \
  40. ## If the _SCRIPTS variable has an entry like foo/bar, install it as
  41. ## $(destdir)/bar, not $(destdir)/foo/bar.  The user can make a
  42. ## new dir variable or use a nobase_ target for the latter case.
  43. ## However in all cases $(transform) applies only to the basename,
  44. ## so we have to strip the directory part.
  45.         f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \
  46. ## Prepend the directory part if nobase_ is used.
  47. ?!BASE?        f=`echo "$$p" | sed 's|[^/]*$$||'`"$$f"; \
  48.         echo " $(%DIR%SCRIPT_INSTALL) $$d$$p $(DESTDIR)$(%NDIR%dir)/$$f"; \
  49.         $(%DIR%SCRIPT_INSTALL) $$d$$p $(DESTDIR)$(%NDIR%dir)/$$f; \
  50.       else :; fi; \
  51.     done
  52. endif %?INSTALL%
  53.  
  54.  
  55. ## -------------- ##
  56. ## Uninstalling.  ##
  57. ## -------------- ##
  58.  
  59. if %?INSTALL%
  60. .PHONY uninstall-am: uninstall-%DIR%SCRIPTS
  61. uninstall-%DIR%SCRIPTS:
  62.     @$(NORMAL_UNINSTALL)
  63.     @list='$(%DIR%_SCRIPTS)'; for p in $$list; do \
  64. ## Remove any leading directory before applying $(transform).
  65.       f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \
  66. ## Prepend the directory part if nobase_ is used.
  67. ?!BASE?      f=`echo "$$p" | sed 's|[^/]*$$||'`"$$f"; \
  68.       echo " rm -f $(DESTDIR)$(%NDIR%dir)/$$f"; \
  69.       rm -f $(DESTDIR)$(%NDIR%dir)/$$f; \
  70.     done
  71. endif %?INSTALL%
  72.  
  73.  
  74. ## -------------- ##
  75. ## Distributing.  ##
  76. ## -------------- ##
  77.  
  78. if %?DIST%
  79. DIST_COMMON += $(%DIR%_SCRIPTS)
  80. endif %?DIST%
  81.  
  82.  
  83. ## ---------- ##
  84. ## Checking.  ##
  85. ## ---------- ##
  86.  
  87. ## Uncomment line in handle_scripts when this is uncommented.
  88. ## check-%DIR%SCRIPTS:
  89. ##     pid=$$$$; list="$(%DIR%_SCRIPTS)"; for p in $$list; do \
  90. ##       for opt in --help --version; do \
  91. ##         if test -f $$p; then :; \
  92. ##         elif test -f $(srcdir)/$$p; then \
  93. ##           p=$(srcdir)/$$p; \
  94. ##         else exit 1; fi; \
  95. ##         if $$p $$opt > .chkout$$pid 2> .chkerr$$pid \
  96. ##              && test -n "`cat .chkout$$pid`" \
  97. ##              && test -z "`cat .chkerr$$pid`"; then :; \
  98. ##         else echo "$$p failed $$opt test" 1>&2; exit 1; fi; \
  99. ##       done; \
  100. ##     done; rm -f .chk???$$pid
  101.